\hypertarget{class_world}{\section{World Class Reference}
\label{class_world}\index{World@{World}}
}


{\ttfamily \#include $<$world.\-hpp$>$}



Collaboration diagram for World\-:
% FIG 0
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_world_afa39d4e6f714a7a3691ac0c656f5e8a8}{World} ()
\item 
\hyperlink{class_world_a8c73fba541a5817fff65147ba47cd827}{$\sim$\-World} ()
\item 
bool \hyperlink{class_world_a695e14e5574f9bbdf58c8f39538b11d3}{init} (\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} n\-Creature, \hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} n\-Food, \hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} x\-Size, \hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} y\-Size)
\item 
void \hyperlink{class_world_a51b30c67551fb563d87d99d28d0fd6c6}{move\-Screen} (\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} x, \hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} y, \hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} scale)
\item 
void \hyperlink{class_world_aac8c1fde63c06577ffc648aaefdb37f0}{update} ()
\item 
void \hyperlink{class_world_a7fa844c028cf185a5f90359cceeabf7c}{paint} ()
\item 
\hyperlink{class_creature}{Creature} $\ast$ \hyperlink{class_world_aec128c792d233ed624adfc926a3d9744}{get\-Creatures} ()
\item 
void \hyperlink{class_world_a77967920dfc8db42cec61466e92d3404}{save\-Creature} (\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} index, const char $\ast$filename)
\item 
void \hyperlink{class_world_a7f25ed25bcc5ec8f5947c0fd31e8be4d}{load\-Creature} (\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} index, const char $\ast$filename)
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_world_a1b037e6b00d93bac9ec7db5a1217e4fc}{apply\-Collision} ()
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_a42483905f9b8454a61292868d29a8843}{m\-\_\-n\-Creature}
\item 
\hyperlink{class_creature}{Creature} $\ast$ \hyperlink{class_world_a83dbea29b17661c6ca0252e82e932b1e}{m\-\_\-creatures}
\item 
\hyperlink{class_food}{Food} $\ast$ \hyperlink{class_world_a2813ef8498f64db3f9ee964c07d0a205}{m\-\_\-food}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_a6bf5860fb9d8f404200592609206e216}{m\-\_\-x\-Scr}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_a6b96ef9603bdd3c8bca55eb7e3ec88bd}{m\-\_\-y\-Scr}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_a02f718296e4f2887157520a32c816751}{m\-\_\-scale}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_a189b065d93b1ec9055065fea18aa9961}{m\-\_\-x\-Size}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_a7e13242f5970ab45bd6b992c8987d972}{m\-\_\-y\-Size}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_a8a39b5be00006f714a4dcb55e0410e0d}{m\-\_\-tick}
\item 
\hyperlink{types_8hpp_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint} \hyperlink{class_world_aab92ff316e69058675e7232c84fdc246}{m\-\_\-state}
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 15 of file world.\-hpp.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_world_afa39d4e6f714a7a3691ac0c656f5e8a8}{\index{World@{World}!World@{World}}
\index{World@{World}!World@{World}}
\subsubsection[{World}]{\setlength{\rightskip}{0pt plus 5cm}{\bf World\-::\-World} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_world_afa39d4e6f714a7a3691ac0c656f5e8a8}


Definition at line 6 of file world.\-cpp.

\hypertarget{class_world_a8c73fba541a5817fff65147ba47cd827}{\index{World@{World}!$\sim$\-World@{$\sim$\-World}}
\index{$\sim$\-World@{$\sim$\-World}!World@{World}}
\subsubsection[{$\sim$\-World}]{\setlength{\rightskip}{0pt plus 5cm}{\bf World\-::$\sim$\-World} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_world_a8c73fba541a5817fff65147ba47cd827}


Definition at line 8 of file world.\-cpp.



\subsection{Member Function Documentation}
\hypertarget{class_world_a1b037e6b00d93bac9ec7db5a1217e4fc}{\index{World@{World}!apply\-Collision@{apply\-Collision}}
\index{apply\-Collision@{apply\-Collision}!World@{World}}
\subsubsection[{apply\-Collision}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf World\-::apply\-Collision} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a1b037e6b00d93bac9ec7db5a1217e4fc}


Definition at line 85 of file world.\-cpp.



References dot\-Product(), Object\-::get\-Kinematic(), get\-Mag(), Object\-::get\-Radius(), m\-\_\-creatures, m\-\_\-n\-Creature, m\-\_\-x\-Size, m\-\_\-y\-Size, s\-\_\-kinematic\-::pos, s\-\_\-kinematic\-::vel, s\-\_\-vector\-::x, and s\-\_\-vector\-::y.



Referenced by paint().



Here is the call graph for this function\-:
% FIG 1




Here is the caller graph for this function\-:
% FIG 2


\hypertarget{class_world_aec128c792d233ed624adfc926a3d9744}{\index{World@{World}!get\-Creatures@{get\-Creatures}}
\index{get\-Creatures@{get\-Creatures}!World@{World}}
\subsubsection[{get\-Creatures}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Creature} $\ast$ {\bf World\-::get\-Creatures} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_world_aec128c792d233ed624adfc926a3d9744}


Definition at line 73 of file world.\-cpp.



References m\-\_\-creatures.

\hypertarget{class_world_a695e14e5574f9bbdf58c8f39538b11d3}{\index{World@{World}!init@{init}}
\index{init@{init}!World@{World}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf World\-::init} (
\begin{DoxyParamCaption}
\item[{{\bf uint}}]{n\-Creature, }
\item[{{\bf uint}}]{n\-Food, }
\item[{{\bf uint}}]{x\-Size, }
\item[{{\bf uint}}]{y\-Size}
\end{DoxyParamCaption}
)}}\label{class_world_a695e14e5574f9bbdf58c8f39538b11d3}


Definition at line 10 of file world.\-cpp.



References s\-\_\-colour\-::b, s\-\_\-colour\-::g, Object\-::get\-Colour(), Object\-::get\-Kinematic(), Object\-::get\-Radius(), Creature\-::init(), m\-\_\-creatures, m\-\_\-n\-Creature, m\-\_\-scale, m\-\_\-x\-Scr, m\-\_\-x\-Size, m\-\_\-y\-Scr, m\-\_\-y\-Size, s\-\_\-kinematic\-::pos, s\-\_\-colour\-::r, s\-\_\-kinematic\-::vel, s\-\_\-vector\-::x, and s\-\_\-vector\-::y.



Referenced by init\-Core().



Here is the call graph for this function\-:
% FIG 3




Here is the caller graph for this function\-:
% FIG 4


\hypertarget{class_world_a7f25ed25bcc5ec8f5947c0fd31e8be4d}{\index{World@{World}!load\-Creature@{load\-Creature}}
\index{load\-Creature@{load\-Creature}!World@{World}}
\subsubsection[{load\-Creature}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf World\-::load\-Creature} (
\begin{DoxyParamCaption}
\item[{{\bf uint}}]{index, }
\item[{const char $\ast$}]{filename}
\end{DoxyParamCaption}
)}}\label{class_world_a7f25ed25bcc5ec8f5947c0fd31e8be4d}


Definition at line 81 of file world.\-cpp.

\hypertarget{class_world_a51b30c67551fb563d87d99d28d0fd6c6}{\index{World@{World}!move\-Screen@{move\-Screen}}
\index{move\-Screen@{move\-Screen}!World@{World}}
\subsubsection[{move\-Screen}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf World\-::move\-Screen} (
\begin{DoxyParamCaption}
\item[{{\bf uint}}]{x, }
\item[{{\bf uint}}]{y, }
\item[{{\bf uint}}]{scale}
\end{DoxyParamCaption}
)}}\label{class_world_a51b30c67551fb563d87d99d28d0fd6c6}


Definition at line 45 of file world.\-cpp.

\hypertarget{class_world_a7fa844c028cf185a5f90359cceeabf7c}{\index{World@{World}!paint@{paint}}
\index{paint@{paint}!World@{World}}
\subsubsection[{paint}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf World\-::paint} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_world_a7fa844c028cf185a5f90359cceeabf7c}


Definition at line 57 of file world.\-cpp.



References apply\-Collision(), m\-\_\-creatures, m\-\_\-n\-Creature, and Creature\-::paint().



Referenced by display().



Here is the call graph for this function\-:
% FIG 5




Here is the caller graph for this function\-:
% FIG 6


\hypertarget{class_world_a77967920dfc8db42cec61466e92d3404}{\index{World@{World}!save\-Creature@{save\-Creature}}
\index{save\-Creature@{save\-Creature}!World@{World}}
\subsubsection[{save\-Creature}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf World\-::save\-Creature} (
\begin{DoxyParamCaption}
\item[{{\bf uint}}]{index, }
\item[{const char $\ast$}]{filename}
\end{DoxyParamCaption}
)}}\label{class_world_a77967920dfc8db42cec61466e92d3404}


Definition at line 77 of file world.\-cpp.

\hypertarget{class_world_aac8c1fde63c06577ffc648aaefdb37f0}{\index{World@{World}!update@{update}}
\index{update@{update}!World@{World}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf World\-::update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_world_aac8c1fde63c06577ffc648aaefdb37f0}


Definition at line 49 of file world.\-cpp.



References m\-\_\-creatures, m\-\_\-n\-Creature, and Creature\-::move().



Referenced by animate().



Here is the call graph for this function\-:
% FIG 7




Here is the caller graph for this function\-:
% FIG 8




\subsection{Member Data Documentation}
\hypertarget{class_world_a83dbea29b17661c6ca0252e82e932b1e}{\index{World@{World}!m\-\_\-creatures@{m\-\_\-creatures}}
\index{m\-\_\-creatures@{m\-\_\-creatures}!World@{World}}
\subsubsection[{m\-\_\-creatures}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Creature}$\ast$ {\bf World\-::m\-\_\-creatures}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a83dbea29b17661c6ca0252e82e932b1e}


Definition at line 30 of file world.\-hpp.



Referenced by apply\-Collision(), get\-Creatures(), init(), paint(), and update().

\hypertarget{class_world_a2813ef8498f64db3f9ee964c07d0a205}{\index{World@{World}!m\-\_\-food@{m\-\_\-food}}
\index{m\-\_\-food@{m\-\_\-food}!World@{World}}
\subsubsection[{m\-\_\-food}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Food}$\ast$ {\bf World\-::m\-\_\-food}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a2813ef8498f64db3f9ee964c07d0a205}


Definition at line 31 of file world.\-hpp.

\hypertarget{class_world_a42483905f9b8454a61292868d29a8843}{\index{World@{World}!m\-\_\-n\-Creature@{m\-\_\-n\-Creature}}
\index{m\-\_\-n\-Creature@{m\-\_\-n\-Creature}!World@{World}}
\subsubsection[{m\-\_\-n\-Creature}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-n\-Creature}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a42483905f9b8454a61292868d29a8843}


Definition at line 29 of file world.\-hpp.



Referenced by apply\-Collision(), init(), paint(), and update().

\hypertarget{class_world_a02f718296e4f2887157520a32c816751}{\index{World@{World}!m\-\_\-scale@{m\-\_\-scale}}
\index{m\-\_\-scale@{m\-\_\-scale}!World@{World}}
\subsubsection[{m\-\_\-scale}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-scale}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a02f718296e4f2887157520a32c816751}


Definition at line 36 of file world.\-hpp.



Referenced by init().

\hypertarget{class_world_aab92ff316e69058675e7232c84fdc246}{\index{World@{World}!m\-\_\-state@{m\-\_\-state}}
\index{m\-\_\-state@{m\-\_\-state}!World@{World}}
\subsubsection[{m\-\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-state}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_aab92ff316e69058675e7232c84fdc246}


Definition at line 42 of file world.\-hpp.

\hypertarget{class_world_a8a39b5be00006f714a4dcb55e0410e0d}{\index{World@{World}!m\-\_\-tick@{m\-\_\-tick}}
\index{m\-\_\-tick@{m\-\_\-tick}!World@{World}}
\subsubsection[{m\-\_\-tick}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-tick}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a8a39b5be00006f714a4dcb55e0410e0d}


Definition at line 41 of file world.\-hpp.

\hypertarget{class_world_a6bf5860fb9d8f404200592609206e216}{\index{World@{World}!m\-\_\-x\-Scr@{m\-\_\-x\-Scr}}
\index{m\-\_\-x\-Scr@{m\-\_\-x\-Scr}!World@{World}}
\subsubsection[{m\-\_\-x\-Scr}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-x\-Scr}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a6bf5860fb9d8f404200592609206e216}


Definition at line 34 of file world.\-hpp.



Referenced by init().

\hypertarget{class_world_a189b065d93b1ec9055065fea18aa9961}{\index{World@{World}!m\-\_\-x\-Size@{m\-\_\-x\-Size}}
\index{m\-\_\-x\-Size@{m\-\_\-x\-Size}!World@{World}}
\subsubsection[{m\-\_\-x\-Size}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-x\-Size}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a189b065d93b1ec9055065fea18aa9961}


Definition at line 38 of file world.\-hpp.



Referenced by apply\-Collision(), and init().

\hypertarget{class_world_a6b96ef9603bdd3c8bca55eb7e3ec88bd}{\index{World@{World}!m\-\_\-y\-Scr@{m\-\_\-y\-Scr}}
\index{m\-\_\-y\-Scr@{m\-\_\-y\-Scr}!World@{World}}
\subsubsection[{m\-\_\-y\-Scr}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-y\-Scr}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a6b96ef9603bdd3c8bca55eb7e3ec88bd}


Definition at line 35 of file world.\-hpp.



Referenced by init().

\hypertarget{class_world_a7e13242f5970ab45bd6b992c8987d972}{\index{World@{World}!m\-\_\-y\-Size@{m\-\_\-y\-Size}}
\index{m\-\_\-y\-Size@{m\-\_\-y\-Size}!World@{World}}
\subsubsection[{m\-\_\-y\-Size}]{\setlength{\rightskip}{0pt plus 5cm}{\bf uint} {\bf World\-::m\-\_\-y\-Size}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_world_a7e13242f5970ab45bd6b992c8987d972}


Definition at line 39 of file world.\-hpp.



Referenced by apply\-Collision(), and init().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{world_8hpp}{world.\-hpp}\item 
\hyperlink{world_8cpp}{world.\-cpp}\end{DoxyCompactItemize}
